#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) {
        vector<int>v;
        int sz1 = nums1.size();
        int sz2 = nums2.size();
        for (int i = 0;i < sz1;i++)v.push_back(nums1[i]);
        for (int i = 0;i < sz2;i++)v.push_back(nums2[i]);
        std::sort(v.begin(), v.end());
        int tmp = sz1 + sz2;
        if (tmp % 2 == 0)return (v[tmp / 2 - 1] + v[tmp / 2]) * 1.0 / 2;
        else return v[tmp / 2] * 1.0;
    }
};